<template>
  <div class="home">
    <div class="header">
      <!-- 备用域名 -->
      <alternate-domain />
      <!-- 花仙子地址展示 -->
      <current-web />
    </div>
    <div class="home-container">
      <img class="top-border" src="../assets/home/11.jfif" alt="top-border" />
      <img
        class="bottom-border"
        src="../assets/home/index_144.jpg"
        alt="bottom-border"
      />
      <box-container>
        <logo-set />
      </box-container>
      <!-- 六合彩 -->
      <box-container class="m-t10">
        <lottery-record
          :redWaves="data.redWaves"
          :blueWaves="data.blueWaves"
          :greenWaves="data.greenWaves"
        />
      </box-container>
      <!-- 广告部分 -->
      <box-container class="m-t10">
        <cdvertising />
      </box-container>

      <!-- 六肖六码 -->
      <box-container class="m-t10">
        <sixxiao-sixyards />
      </box-container>

      <box-container class="m-t10">
        <!-- 顶尖区 -->
        <top-range />
        <!-- 高手区 -->
        <master-range />
      </box-container>

      <!-- 黄金区 -->
      <box-container class="m-t10">
        <template v-for="item of data.goldData">
          <gold-range :root-item.sync="item" />
        </template>
      </box-container>

      <!-- 原创区 -->
      <box-container class="m-t10">
        <original-range />
      </box-container>

      <!-- 长期发布 -->
      <box-container class="m-t10">
        <long-release />
      </box-container>

      <!-- 精选↓↓↓优秀↓↓↓网站 -->
      <box-container class="m-t10">
        <excellent-web />
      </box-container>

      <!-- 征集高手料 -->
      <box-container class="m-t10">
        <recruit-experts />
      </box-container>

      <!-- **近期死公式 -->
      <box-container class="m-t10">
        <near-death-formula />
      </box-container>

      <!-- 更多高手料 -->
      <box-container class="m-t10">
        <more-experts />
      </box-container>

      <!-- 广告部分 -->
      <box-container class="m-t10">
        <cdvertising />
      </box-container>

      <!-- 冷门统计 -->
      <!-- <box-container class="m-t10">
        <unpopular-statistics />
      </box-container> -->

      <!-- 完结提醒 -->
      <box-container class="m-t10">
        <div class="border bg-yellow font25 red p-10 text-center font-bolder">
          <span class="purple font20">花仙子论坛：</span>www.<span
            class="font30"
            >605555</span
          >.com<span class="purple font20">期待您再次浏览</span>
        </div>
      </box-container>

      <!-- 红、蓝、绿波表格 -->
      <box-container class="m-t10">
        <red-blue-green
          :redWaves="data.redWaves"
          :blueWaves="data.blueWaves"
          :greenWaves="data.greenWaves"
        />
      </box-container>

      <!-- 五行 生肖对照表 -->
      <box-container class="m-t10" borderColor="#00ff00">
        <five-zodiac-table
          :redWaves="data.redWaves"
          :blueWaves="data.blueWaves"
          :greenWaves="data.greenWaves"
        />
      </box-container>

      <!-- 底部部分 -->
      <box-container class="m-t10">
        <foot-container />
      </box-container>
    </div>
  </div>
</template>

<script setup>
import { onMounted, reactive } from "vue";
import BoxContainer from "@/components/BoxContainer.vue";
import AlternateDomain from "./home/AlternateDomain.vue";
import CurrentWeb from "./home/CurrentWeb.vue";
import LogoSet from "./home/LogoSet.vue";
import LotteryRecord from "./home/LotteryRecord.vue";
import Cdvertising from "./home/Cdvertising.vue";
import SixxiaoSixyards from "./home/SixxiaoSixyards.vue";
import TopRange from "./home/TopRange.vue";
import MasterRange from "./home/MasterRange.vue";
import GoldRange from "./home/GoldRange.vue";
import OriginalRange from "./home/OriginalRange.vue";
import LongRelease from "./home/LongRelease.vue";
import ExcellentWeb from "./home/ExcellentWeb.vue";
import RecruitExperts from "./home/RecruitExperts.vue";
import NearDeathFormula from "./home/NearDeathFormula.vue";
import MoreExperts from "./home/MoreExperts.vue";
import UnpopularStatistics from "./home/UnpopularStatistics.vue";
import RedBlueGreen from "./home/RedBlueGreen.vue";
import FiveZodiacTable from "./home/FiveZodiacTable.vue";
import FootContainer from "@/components/FootContainer.vue";
import { getApiGoldRangeData } from "@/api/api";

const data = reactive({
  goldData: [],
  redWaves: [],
  blueWaves: [],
  greenWaves: [],
});
onMounted(() => {
  getGoldInfo();
});
const getGoldInfo = () => {
  getApiGoldRangeData().then((res) => {
    data.goldData = [...res.gold];
    data.redWaves = [...res.redWaves];
    data.blueWaves = [...res.blueWaves];
    data.greenWaves = [...res.greenWaves];
  });
};
</script>

<style lang="less" scoped>
.home {
  max-width: 96rem;
  position: relative;
  left: 50%;
  transform: translateX(-50%);
}
.home-container {
  background: url(../assets/home/index_155.jpg) 100% 100%;
  position: relative;
  min-height: 100px;
  padding: 20px 15px;
  .top-border {
    position: absolute;
    width: 100%;
    top: 0;
    left: 0;
  }
  .bottom-border {
    position: absolute;
    width: 100%;
    bottom: 0;
    left: 0;
  }
}
</style>
